let fs = require('fs');

fs.open('./node/hello.txt','r',function(err, fd){
    if(err){
        console.log(err);
        return;
    }
    console.log('./hello.txt opened');

    let buf = Buffer.alloc(8,1,'utf-8');
    fs.read(fd, buf, 0, 8, null, function(err, bytesRead, buffer){
        if(err){
            console.log(err);
            return;
        }
        console.log('bytesRead: ', bytesRead); // 8 
        console.log(buffer); // <Buffer 61 73 64 66 61 73 64 66> 
    })
})